\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.45]{includes/graphics/domain_modelv4.jpg}
\caption{Domain model}
\label{fig:design:domain_model}
\end{center}
\end{figure} 
 
The domain consists of two parts, the booking domain and travel domain. \\

\subsubsection*{Booking domain}
The booking domain is used for representing the booking information when a customer books a flight. A booking is related to only one customer, who is responsible for the booking. A booking contains one or more passengers and the same passenger can appear on many bookings.

In order to handle the scenario where a customer is both a passenger and customer in a specific booking, or where a customer does not have to be a passenger in the booking, we use the PersonRole domain for defining the role of the person. A person can have a maximum of two roles.

\subsubsection*{Travel domain}
The Travel domain is used for representing information about an entire trip, that can maximum contain three jumps. There is a one to one relationship between a booking and travel because it is only allowed to have one travel per booking. A travel defines the departure and arrival airports using the Airport domain.    

The Flight domain is used for representing individual flights that comprises a travel. Each travel is allowed to contain max three flights but the same flight can participate in one to many travels.

The physical air plane information is represented using the Airplane class. The same air plane can participate in different flights, this is because the same flight can fly at different times of the day or days of the week.